<form method="POST" action="">
    <input type="hidden" name="action" value="update_monitoring" />
    <table class="table plugin-docman-notifications-list">
        <thead>
            <tr>
                <th><i class="icon-trash"></i></th>
                <th class="plugin-docman-notifications-list-user">{{ notified_people }}</th>
                <th class="plugin-docman-notifications-list-document">{{ monitored_doc }}</th>
            </tr>
        </thead>
        <tbody>
            {{# has_listeners }}
                 {{# ugroups_to_be_notified }}
                    <tr>
                        <td>
                            <input type="checkbox"
                                   value="{{# ugroup }}{{ ugroup_id }}{{/ ugroup }}"
                                   name="listeners_ugroups_to_delete[]"
                                   {{^ can_be_deleted }}
                                       disabled="disabled"
                                       title="{{ cannot_delete_title }}"
                                   {{/ can_be_deleted }}
                            >
                        </td>
                        <td>
                            {{# ugroup }}
                               <i class="icon-group docman-notification-email-list-group-icon"></i>
                               {{ label }}
                            {{/ ugroup }}
                        </td>
                        <td>{{ item_title }}</td>
                    </tr>
                 {{/ ugroups_to_be_notified }}
                 {{# users_to_be_notified }}
                    <tr>
                        <td>
                            <input type="checkbox"
                                   value="{{# user }}{{ user_id }}{{/ user}}"
                                   name="listeners_users_to_delete[]"
                                   {{^ can_be_deleted }}
                                       disabled="disabled"
                                       title="{{ cannot_delete_title }}"
                                   {{/ can_be_deleted }}
                            >
                        </td>
                        <td class="docman-notification-user">
                            {{# user }}
                                <div class="avatar docman-notification-user-avatar">
                                    {{# has_avatar }}<img src="{{ avatar_url }}" />{{/ has_avatar }}
                                </div>
                                {{ label }}
                            {{/ user }}
                        </td>
                        <td>{{ item_title }}</td>
                    </tr>
                {{/ users_to_be_notified }}
            {{/ has_listeners }}

            {{^ has_listeners }}
                <tr>
                    <td colspan="3" class="table-cell-empty">{{ empty_state }}</td>
                </tr>
            {{/ has_listeners }}
            <tr>
                {{# has_listeners }}<td></td>{{/ has_listeners }}
                <td {{# has_listeners }}colspan="2"{{/ has_listeners }}
                    {{^ has_listeners }}colspan="3"{{/ has_listeners }}
                >
                    <input type="hidden"
                           id="listeners_to_add"
                           name="listeners_to_add"
                           class="autocompleter-users-and-ugroups-input"
                           placeholder="{{ placeholder }}"
                           data-project-id="{{ project_id }}"
                           multiple
                    />
                    <label class="checkbox docman-notification-add-cascade" for="plugin_docman_monitor_add_user_cascade">
                        <input type="checkbox" name="monitor_cascade" value="1" id="plugin_docman_monitor_add_user_cascade">
                        {{ enable_sub_hierarchy }}
                    </label>
                </td>
            </tr>
      </tbody>
    </table>

    <input type="submit" value="{{ validate_button }}" class="btn btn-primary">
</form>
